package com.shop.service.impl;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shop.bean.Shop;
import com.shop.bean.User;
import com.shop.dao.AdminDao;
import com.shop.service.AdminService;
@Service
@Transactional
public class AdminServiceImpl implements AdminService {
	@Resource
	private AdminDao adminDao;
	
	public AdminDao getAdminDao() {
		return adminDao;
	}

	public void setAdminDao(AdminDao adminDao) {
		this.adminDao = adminDao;
	}

	@Override
	public ArrayList<Shop> queryByStype(Integer stype) {
		
		return adminDao.queryByStype(stype);
	}

	@Override
	public ArrayList<Shop> queryByAddShop(Integer addshop) {
		
		return adminDao.queryByAddShop(addshop);
	}

	@Override
	public ArrayList<User> queryByUtype(Integer utype) {
		
		return adminDao.queryByUtype(utype);
	}

	@Override
	public Integer updateAddshop(Shop shop) {
		
		return adminDao.updateAddshop(shop);
	}

	@Override
	public Integer updateStype(Shop shop) {
		
		return adminDao.updateStype(shop);
	}

	@Override
	public Integer updateUtype(User user) {
		// TODO Auto-generated method stub
		return adminDao.updateUtype(user);
	}

	@Override
	public ArrayList<User> queryUserByUname(String uname) {
		// TODO Auto-generated method stub
		return adminDao.queryUserByUname(uname);
	}

	@Override
	public Integer updateAgainUtype(User user) {
		// TODO Auto-generated method stub
		return adminDao.updateAgainUtype(user);
	}

	@Override
	public Integer updateAgainStype(Shop shop) {
		// TODO Auto-generated method stub
		return adminDao.updateAgainStype(shop);
	}

}
